<script>
  init({
    title: 'Issue #371',
    desc: 'Using table content in a HTML form(<a href="https://github.com/wenzhixin/bootstrap-table/issues/371" target="_blank">#371</a>).',
    links: ['bootstrap-table.min.css'],
    scripts: ['bootstrap-table.min.js']
  })

</script>

<form action="" method="get">
    <input class="btn btn-secondary" type="submit" value="Submit">
    <table
            data-id-field="id"
            data-select-item-name="input"
            data-toggle="table"
            data-toolbar=":submit"
            data-url="json/data1.json"
            id="table">
        <thead>
        <tr>
            <th data-checkbox="true" data-field="state"></th>
            <th data-field="id">ID</th>
            <th data-field="name">Item Name</th>
            <th data-field="price">Item Price</th>
        </tr>
        </thead>
    </table>
</form>

<script>
  function mounted() {
    $('form').submit(function (event) {
      event.preventDefault()
      alert($(this).serialize())
    })
  }

</script>
